package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvoiceMapper;
import com.ruoyi.system.domain.Invoice;
import com.ruoyi.system.service.IInvoiceService;

/**
 * 货物发票信息Service业务层处理
 * 
 * @author 格格本奈
 * @date 2024-03-06
 */
@Service
public class InvoiceServiceImpl implements IInvoiceService 
{
    @Autowired
    private InvoiceMapper invoiceMapper;

    /**
     * 查询货物发票信息
     * 
     * @param id 货物发票信息主键
     * @return 货物发票信息
     */
    @Override
    public Invoice selectInvoiceById(Long id)
    {
        return invoiceMapper.selectInvoiceById(id);
    }

    /**
     * 查询货物发票信息列表
     * 
     * @param invoice 货物发票信息
     * @return 货物发票信息
     */
    @Override
    public List<Invoice> selectInvoiceList(Invoice invoice)
    {
        return invoiceMapper.selectInvoiceList(invoice);
    }

    /**
     * 新增货物发票信息
     * 
     * @param invoice 货物发票信息
     * @return 结果
     */
    @Override
    public int insertInvoice(Invoice invoice)
    {
        return invoiceMapper.insertInvoice(invoice);
    }

    /**
     * 修改货物发票信息
     * 
     * @param invoice 货物发票信息
     * @return 结果
     */
    @Override
    public int updateInvoice(Invoice invoice)
    {
        return invoiceMapper.updateInvoice(invoice);
    }

    /**
     * 批量删除货物发票信息
     * 
     * @param ids 需要删除的货物发票信息主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceByIds(Long[] ids)
    {
        return invoiceMapper.deleteInvoiceByIds(ids);
    }

    /**
     * 删除货物发票信息信息
     * 
     * @param id 货物发票信息主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceById(Long id)
    {
        return invoiceMapper.deleteInvoiceById(id);
    }
}
